8017254ee4963f3d48ac403cbeb227f97903f403,oneSheeld/src/main/java/com/integreight/onesheeld/shields/controller/DataLoggerShield.java,DataLoggerShield,showNotification,#String#,246
Before Change
Intent notificationIntent = new Intent(Intent.ACTION_VIEW);
MimeTypeMap mimeTypeMap = MimeTypeMap.getSingleton();
String mimeFileType = mimeTypeMap.getMimeTypeFromExtension("csv");
notificationIntent.setDataAndType(Uri.fromFile(new File(filePath == null
|| filePath.length() == 0 ? "" : filePath)), mimeFileType);
notificationIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
PendingIntent intent = PendingIntent.getActivity(activity, 0,
notificationIntent, 0);
After Change
notificationIntent.setDataAndType(fileURI, mimeFileType);
}
else{
notificationIntent.setDataAndType(Uri.fromFile(new File(filePath == null
|| filePath.length() == 0 ? "" : filePath)), mimeFileType);
}
notificationIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
notificationIntent.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);